import Vue from 'vue'
import Router from 'vue-router'
const AdminChild = () => import( '../src/AdminChild.vue')
const AdminChild2 = () => import( '../src/AdminChild2.vue')
const AdminChild3 = () => import( '../src/AdminChild3.vue')

Vue.use(Router)

let router =  new Router({
  // mode: 'history',
  routes: [
    {  //一级目录 默认是 AdminChild
      path: '/',
      component: AdminChild,
    },
    { //二级目录
      path: '/admin2',
      name: 'AdminChild2',
      component: AdminChild2,
      children: [
        { //三级目录
          path: 'admin3',
          component: AdminChild3
        }
      ]
    }
  ]
})

export default router;
